<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%-- <%
 	String path = request.getContextPath();
 	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
 			+ path + "/";
 			 %>  --%>
<%-- <link href="${pageContext.request.contextPath }/css/head.css" rel="stylesheet" /> --%>
<%-- <link href="${pageContext.request.contextPath }/css/toastr.min.css" rel="stylesheet" /> --%>
<nav class="navbar navbar-static-top" role="navigation"style="margin-bottom: 0; background-color: white;">
<!-- 	<div style="float: left; display: inline-flex; padding: 13px 20px; height: 60px;"> -->
<!-- 		<div class="input-group-btn"> -->
<!-- 			<button data-toggle="dropdown" -->
<!-- 				class="btn btn-primary dropdown-toggle" type="button" -->
<!-- 				style="border-radius: 3px;"> -->
<!-- 				<i class="fa fa-bars"></i> -->
<!-- 			</button> -->
<!-- 			<ul class="dropdown-menu"> -->
<!-- 				<li><a href="#">Action</a></li> -->
<!-- 				<li><a href="#">Another action</a></li> -->
<!-- 				<li><a href="#">Something else here</a></li> -->
<!-- 			</ul> -->
<!-- 		</div> -->
<!-- 	</div> -->
	 <div class="navbar-header" style="height:60px">
                        <!-- <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i
                                class="fa fa-bars"></i> </a> -->
                                <div class="form-group minimalize-styl-2" style="margin-left: 9px; margin-top: 8px;">
                                    <div class="input-group" style="width: 50px;">
                                        <div class="input-group-btn">
                                            <button data-toggle="dropdown" class="btn btn-primary dropdown-toggle" type="button" style="border-radius: 3px;"><i class="fa fa-bars"></i>  &nbsp;全部</button>
                                            <ul class="dropdown-menu">
                                           		<li><a href="#">全部</a></li>
                                                <li><a href="#">资讯</a></li>
                                                <li><a href="#">电商</a></li>
                                                <li><a href="#">社媒</a></li>
                                                <li><a href="#">政府</a></li>
                                                <li><a href="#">学术</a></li>
                                                <li><a href="#">法律</a></li>
                                                <li><a href="#">招标</a></li>
                                                <li><a href="#">境外</a></li> 
                                                <li><a href="#">证券</a></li>
                                                <li><a href="#">招聘</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                        <!--搜索框  -->
                        <form role="search" class="navbar-form-custom" action="search_results.html">
                            <div class="form-group">
                                <input type="text" placeholder="数据搜索关键词..." class="form-control"
                                    name="top-search" id="top-search">
                            </div>
                        </form>
                    </div>
	<!-- nav2 start -->
<!-- 	<ul class="nav navbar-top-links navbar-right" style="float: left !important;margin-top: 10px;"> -->
<!-- 	<li> -->
<!-- 		<div id="searchBars" style="margin-left: 20px;position: relative;"> -->
<!-- 		<input  type="text" id="searchName" name="searchName" placeholder="搜索" class="contentsearchName" >  -->
<!-- 		<svg onclick="checkForm()" class="checksvg"  viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="icon-search icon" data-v-790e9d70="" style="width: 20px;height: 20px;fill: #aaa;"> -->
<!-- 		<path d="M16 14.588L14.601 16l-3.832-3.855a6.63 6.63 0 0 1-4.062 1.392C3.003 13.537 0 10.507 0 6.768 0 3.031 3.003 0 6.707 0c3.704 0 6.706 3.03 6.706 6.768a6.768 6.768 0 0 1-1.265 3.946L16 14.588zM6.707 1.641c-2.807 0-5.081 2.295-5.081 5.127s2.274 5.128 5.08 5.128 5.081-2.296 5.081-5.128c0-2.832-2.274-5.127-5.08-5.127z"> -->
<!-- 		</path> -->
<!-- 		</svg> -->
<!-- 	    </div> -->
<!--     </li> -->
<!-- 	</ul> -->
	<!-- nav2 end -->
	<!-- user set start -->
	<ul class="nav navbar-top-links navbar-right">
	<li><span class="dropdown profile-element">
		<a data-toggle="dropdown" class="dropdown-toggle" href="#" style="color: #999c9e; font-weight: 600">
			<i class="fa fa-cog"></i>&nbsp;&nbsp;系统设置 </a>
		<ul class="dropdown-menu animated fadeInRight m-t-xs" style="float: right; margin-top: 2em; margin-right: -7.4em;">
			<li><a href="${pageContext.request.contextPath}/admin/tosystem_overview_factory">
			 	<i class="fa fa-tasks"></i>&nbsp;&nbsp;爬虫管理</a>
			</li>
			<li class="divider"></li>
			<li><a href="${pageContext.request.contextPath}/admin/tosystem_overview_factory">
			 	<i class="fa fa-cube"></i>&nbsp;&nbsp;数据接口</a>
			</li>
			<li class="divider"></li>
			<li><a href="${pageContext.request.contextPath}/information/toBusiness?classify=q">
				<i class="fa fa-exchange"></i>&nbsp;&nbsp;菜单切换</a></li>
			<li class="divider"></li>
			<li><a href="${pageContext.request.contextPath}/admin/datasource">
				<i class="fa fa-exchange"></i>&nbsp;&nbsp;数据源</a></li>
			</ul>
		</span>
		</li>
		<li><span class="dropdown profile-element"> 
		<a data-toggle="dropdown" class="dropdown-toggle" href="#" style="color: #999c9e; font-weight: 600"> 
			<i class="fa fa-user"></i>&nbsp;&nbsp;个人中心 </a>
			<ul class="dropdown-menu animated fadeInRight m-t-xs" style="float: right; margin-top: 2em; margin-right: -7.4em;">
					<li><a
						href="${pageContext.request.contextPath}/toupdatePassword"><i
							class="fa fa-unlock-alt"></i>&nbsp;&nbsp;修改密码</a></li>
			</ul>
		</span>
		</li>

		<li><a href="/spider-factory/exit"> <i class="fa fa-sign-out"></i>退出
		</a></li>
	</ul>
	<!-- user set end -->
</nav>


	
        
    <!-- Mainly scripts -->
    <script src="${pageContext.request.contextPath }/js/jquery-2.1.1.js"></script>
   	<script src="${pageContext.request.contextPath }/js/plugins/toastr/toastr.min.js"></script>
    <script>
	    $(document).on('focus',"#searchBars",function(){//跳转点击事件
	    	$('#searchBars').addClass('focus');
	    });
	    $(document).on('blur',"#searchBars",function(){//跳转点击事件
	    	$('#searchBars').removeClass('focus');
	    });
	    
	    function checkForm(){
	    	var searchName = $("#searchName").val()
	    	
	    	if(!searchName){
	    		toastr.error('搜索条件不可为空');
	    		return;
	    	}else{
	    	searchName = searchName.trim()
	    		console.log("输出:"+searchName+".")
	    		if(searchName == ""){
	    			toastr.error('搜索条件不可为空');
		    		return;
	    		}
	    	}
	    	window.location.href = "${pageContext.request.contextPath}/searchResults?searchName=" +searchName;
	    }
	    $('#searchName').keydown(function(){
	         if (event.keyCode == 13) {    
	        	 var searchName = $("#searchName").val()
	 	    	
	 	    	if(!searchName){
	 	    		toastr.error('搜索条件不可为空');
	 	    		return;
	 	    	}else{
	 	    	searchName = searchName.trim()
	 	    		console.log("输出:"+searchName+".")
	 	    		if(searchName == ""){
	 	    			toastr.error('搜索条件不可为空');
	 		    		return;
	 	    		}
	 	    	}
	 	    	window.location.href = "${pageContext.request.contextPath}/searchResults?searchName=" +searchName;
	         };            
	         
	     });
    </script>
